package com.lgx.mall.business.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lgx.common.web.Pagination;
import com.lgx.mall.business.dao.IReturnRequestDao;
import com.lgx.mall.business.entity.ReturnRequest;
import com.lgx.mall.business.service.IReturnRequestService;

@Service
public class ReturnRequestService implements IReturnRequestService {
	
	@Autowired
	private IReturnRequestDao returnRequestDao;

	public IReturnRequestDao getReturnRequestDao() {
		return returnRequestDao;
	}

	public void setReturnRequestDao(IReturnRequestDao returnRequestDao) {
		this.returnRequestDao = returnRequestDao;
	}

	
	/**
	 * 创建
	 */
	@Override
	public ReturnRequest createReturnRequest(ReturnRequest returnRequest) {
		return this.returnRequestDao.createReturnRequest(returnRequest);
	}

	/**
	 * 删除
	 */
	@Override
	public void deleteReturnRequest(ReturnRequest returnRequest) {
		this.returnRequestDao.deleteReturnRequest(returnRequest);
	}

	/**
	 * 修改
	 */
	@Override
	public void updateReturnRequest(ReturnRequest returnRequest) {
		this.returnRequestDao.updateReturnRequest(returnRequest);
	}

	/**
	 * 查询
	 * 查询全部
	 */
	@Override
	public List<ReturnRequest> findReturnRequest() {
		return this.returnRequestDao.findReturnRequest();
	}

	/**
	 * 根据id查询
	 */
	@Override
	public ReturnRequest findReturnRequest(Long id) {
		return this.returnRequestDao.findReturnRequest(id);
	}

	/**
	 * 分页查询当前订单记录
	 */
	@Override
	public Pagination findReturnPagination(Long orderId, int pageSize,
			int pageNum) {
		return this.returnRequestDao.findReturnPagination(orderId, pageSize, pageNum);
	}

	@Override
	public List<ReturnRequest> findReturnRequests(Long orderId) {
		return this.returnRequestDao.findReturnRequests(orderId);
	}

}
